package com.webull.information.center.carwler.common.json.unit;

import org.apache.commons.lang3.StringUtils;

/**
 * retures json 工具类
 * 
 * @author shimingjun
 * @date 2016年8月8日 上午11:38:46
 * @version 1.0
 * @since JDK 1.8
 */
public class CreateServiceToken_1 {
	public final static String restUrl = "https://api.trkd.thomsonreuters.com/api/TokenManagement/TokenManagement.svc/REST/Anonymous/TokenManagement_1/CreateServiceToken_1";

	private static String jsonStr = null;

	public static String getRicRequestJson(String applicationID, String username, String password) {

		if (jsonStr != null) return jsonStr;
		String request_json = "{" //
				+ "		\"CreateServiceToken_Request_1\": {" //
				+ "									  \"ApplicationID\": \"{0}\","//
				+ "									  \"Username\": \"{1}\","//
				+ "									  \"Password\": \"{2}\"" //
				+ "	      							      }" //
				+ "}";
		request_json = StringUtils.replace(request_json, "{0}", applicationID);
		request_json = StringUtils.replace(request_json, "{1}", username);
		request_json = StringUtils.replace(request_json, "{2}", password);
		jsonStr = request_json;
		return jsonStr;
	}

	public static void main(String[] args) {
		// System.out.println(getHomePageTopicRequestJson("zh"));
	}
}
